fix(clipboard): route terminal copy through main process for Wayland (port of upstream #55) - #18
Merged
Merged
Conversation
navigator.clipboard.writeText is gated on focus/user-activation and silently fails on Linux/Wayland (Ozone). Replace with a main-process clipboard.writeText via a new clipboard-write-text IPC. Also register an xterm OSC 52 handler so programs inside the terminal (notably Claude Code's copy-to-clipboard) can set the system clipboard; xterm doesn't wire OSC 52 itself. Port of upstream PR doctly#55 (ymajoros). Closes upstream issue #54 from our fork's perspective; the upstream PR will close it fully when merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Ports upstream PR doctly#55 by @ymajoros to our fork.
Why
`navigator.clipboard.writeText` is gated on focus/user-activation by Chromium. On Linux/Wayland (Ozone), the renderer fails the focus check silently and Ctrl+C in the terminal produces nothing in the system clipboard. JB hit this daily.
How
Checks
Credit
@ymajoros for the original upstream PR. Diff applied unchanged to the corresponding files in our fork — the only minor difference is that our `main.js` is much larger so insertion points sit elsewhere by line number.